package com.motorwaymanage.impl;

import java.io.IOException;

import org.apache.ibatis.session.SqlSession;

import com.motorwaymanage.beans.MaintainerInfo;
import com.motorwaymanage.biz.IMaintainerInfoBiz;
import com.motorwaymanage.dao.DBAccess;

public class MaintainerInfoBizImpl implements IMaintainerInfoBiz{
	private DBAccess db=new DBAccess();
	@Override
	public MaintainerInfo checkMaintainerLogin(MaintainerInfo mi) {
		SqlSession session=null;
		MaintainerInfo currentLogin=null;
		try {
			session=db.getSqlSession();
			IMaintainerInfoBiz maintainerInfoBiz=session.getMapper(IMaintainerInfoBiz.class);
			currentLogin=maintainerInfoBiz.checkMaintainerLogin(mi);
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			session.close();
		}
		return currentLogin;
	}

}
